<%--
  Created by IntelliJ IDEA.
  User: 86166
  Date: 2025/9/3
  Time: 10:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>健康系统登录</title>
</head>
<body>
<h2>用户登录</h2>
<form action="LoginServlet" method="post">
    用户名: <input type="text" name="username" required><br>
    密码: <input type="password" name="password" required><br>
    <input type="submit" value="登录">
    <a href="register.jsp">注册新账号</a>
</form>
<%
    String error = (String) request.getAttribute("error");
    if (error != null) {
%>
<p style="color:red"><%= error %></p>
<%
    }
%>
</body>
</html>
